package yijy.arrayExamples;

/**
 * Created by yijy on 2017/8/11.
 */
class Node{
    private Object value;
    private Node next;

    public Node(Object value) {
        this.value = value;
    }

    public Object getValue() {
        return value;
    }

    public Node getNext() {
        return next;
    }

    public void setNext(Node next) {
        this.next = next;
    }
}

public class MyHashSet {
    private Node[] arry;

    private int size=0;

    public MyHashSet(int length) {
        this.arry = new Node[length];
    }

    public int size(){
        return size;
    }

    /**获得一个对象的改善的哈希码，参考java.util.HashMap类的hash()方法*/
    private static int hash(Object o){
        int h = o.hashCode();
        h += ~ (h << 9);//无符号左移
        h ^= (h >>> 14);//有符号右移
        h += (h << 4);//无符号左移
        h ^= (h>>>10);//有符号右移
        return h;
    }

    public static void main(String[] args) {
        int h=7;
        h ^= 10;
        System.out.println(h);
    }
}
